package com.atguigu.repservice.controller.front;


import com.atguigu.commonutils.R;
import com.atguigu.repservice.entity.RepArea;
import com.atguigu.repservice.service.RepAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ZhuangLiJiao
 * @since 2022-02-11
 */
@Api(description = "区县接口")
@RestController
@RequestMapping("/repservice/repArea")
@CrossOrigin
public class RepAreaController {

    @Autowired
    private RepAreaService repAreaService;


    @ApiOperation("获取肇庆市内全部区县名称")
    @GetMapping("/getAllRreaInZhaoQing")
    public R getAllRreaInZhaoQing() {
        List<RepArea> getAllRreaInZhaoQing = repAreaService.getAllRreaInZhaoQing();
        return R.ok().data("getAllRreaInZhaoQing", getAllRreaInZhaoQing);
    }
}

